"""

类的构造方法
"""


# 使用构造方法对成员变量进行赋值
# 构造方法的名称：__init__
class Student:
    name = None
    age = None
    phone = None

    def __init__(self, name, age, phone):
        self.name = name
        self.age = age
        self.phone = phone
        print(f'我叫：{name}，今年：{age}岁，手机号：{phone}')
        print("Student类创建了一个类对象")

student = Student('小黑', 18, '18866668888')
print(student.name)
print(student.age)